package _15_generics._15_4;

/**
 * 泛型方法
 */
public class _01_GenericMethods {
    public <T> void f(T x){
        System.out.println(x.getClass().getName());
    }

    public static void main(String[] args) {
        _01_GenericMethods gm = new _01_GenericMethods();
        gm.f(1);
        gm.f(1.0);
        gm.f("x");
        gm.f('c');
        gm.f(1f);
        gm.f(gm);
    }
}
